package com.wwdx.service.impl;

import com.google.common.collect.Maps;
import com.wwdx.model.WwdxVipUserModel;
import com.wwdx.service.WwdxVipUserServiceI;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * @author liguoliang
 */
@Service
public class WwdxVipUserServiceImpl extends BaseServiceImpl<WwdxVipUserModel> implements WwdxVipUserServiceI {

    @Override
    public WwdxVipUserModel getByOpenId(String openId) {
        Map<String, Object> params = Maps.newHashMapWithExpectedSize(2);
        params.put("unionid",openId);
        return getByHql("from WwdxVipUserModel where unionid =:unionid",params);
    }
}